using System;
using System.Collections;
using System.Collections.Generic;

using Atom.Data.Base;

namespace Atom.Data.BusinessObjects
{
    public partial class IBalanceRecord : BusinessBase<string>
    {
        #region Declarations

		private string _balanceid = String.Empty;
		private int _trantype = default(Int32);
		private int _medicaretype = default(Int32);
		private string _registerno = String.Empty;
		private int _registertimes = default(Int32);
		private string _invoiceid = String.Empty;
		private int _clinictype = default(Int32);
		private int _balancesign = default(Int32);
		private int? _refundsign = null;
		private string _medtype = null;
		private string _persontype = null;
		private string _medicareno = String.Empty;
		private string _cardno = null;
		private string _medregisterno = String.Empty;
		private string _medtradeno = null;
		private string _medorderno = null;
		private string _operatorid = null;
		private System.DateTime? _operatedate = null;
		private decimal? _accountbalance = null;
		private decimal? _cashpay = null;
		private decimal? _accountpay = null;
		private decimal? _medicarepay = null;
		private decimal? _prepay1 = null;
		private decimal? _prepay2 = null;
		private decimal? _prepay4 = null;
		private decimal? _prepay5 = null;
		private decimal? _prepay6 = null;
		private decimal? _prepay7 = null;
		private decimal? _prepay8 = null;
		private decimal? _prepay9 = null;
		private decimal? _prepay0 = null;
		private decimal? _prepay3 = null;
		private string _sickno = null;
		private string _sickname = null;
		private decimal? _prepay10 = null;
		private decimal? _prepay11 = null;
		private decimal? _prepay12 = null;
		private decimal? _prepay13 = null;
		private decimal? _prepay14 = null;
		private decimal? _prepay15 = null;
		private decimal? _prepay16 = null;
		private decimal? _prepay17 = null;
		private decimal? _prepay18 = null;
		private decimal? _prepay19 = null;
		private decimal? _prepay20 = null;
		
		
		
		#endregion

        #region Constructors

        public IBalanceRecord() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_balanceid);
			sb.Append(_trantype);
			sb.Append(_medicaretype);
			sb.Append(_registerno);
			sb.Append(_registertimes);
			sb.Append(_invoiceid);
			sb.Append(_clinictype);
			sb.Append(_balancesign);
			sb.Append(_refundsign);
			sb.Append(_medtype);
			sb.Append(_persontype);
			sb.Append(_medicareno);
			sb.Append(_cardno);
			sb.Append(_medregisterno);
			sb.Append(_medtradeno);
			sb.Append(_medorderno);
			sb.Append(_operatorid);
			sb.Append(_operatedate);
			sb.Append(_accountbalance);
			sb.Append(_cashpay);
			sb.Append(_accountpay);
			sb.Append(_medicarepay);
			sb.Append(_prepay1);
			sb.Append(_prepay2);
			sb.Append(_prepay4);
			sb.Append(_prepay5);
			sb.Append(_prepay6);
			sb.Append(_prepay7);
			sb.Append(_prepay8);
			sb.Append(_prepay9);
			sb.Append(_prepay0);
			sb.Append(_prepay3);
			sb.Append(_sickno);
			sb.Append(_sickname);
			sb.Append(_prepay10);
			sb.Append(_prepay11);
			sb.Append(_prepay12);
			sb.Append(_prepay13);
			sb.Append(_prepay14);
			sb.Append(_prepay15);
			sb.Append(_prepay16);
			sb.Append(_prepay17);
			sb.Append(_prepay18);
			sb.Append(_prepay19);
			sb.Append(_prepay20);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public override string Id
		{
			get
			{
				System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
				uniqueId.Append(_balanceid.ToString());
				uniqueId.Append("^");
				uniqueId.Append(_trantype.ToString());
				return uniqueId.ToString();
			}
		}
		
		public virtual string Balanceid
        {
            get { return _balanceid; }
			set
			{
				OnBalanceidChanging();
				_balanceid = value;
				OnBalanceidChanged();
			}
        }
		partial void OnBalanceidChanging();
		partial void OnBalanceidChanged();
		
		public virtual int Trantype
        {
            get { return _trantype; }
			set
			{
				OnTrantypeChanging();
				_trantype = value;
				OnTrantypeChanged();
			}
        }
		partial void OnTrantypeChanging();
		partial void OnTrantypeChanged();
		
		public virtual int Medicaretype
        {
            get { return _medicaretype; }
			set
			{
				OnMedicaretypeChanging();
				_medicaretype = value;
				OnMedicaretypeChanged();
			}
        }
		partial void OnMedicaretypeChanging();
		partial void OnMedicaretypeChanged();
		
		public virtual string Registerno
        {
            get { return _registerno; }
			set
			{
				OnRegisternoChanging();
				_registerno = value;
				OnRegisternoChanged();
			}
        }
		partial void OnRegisternoChanging();
		partial void OnRegisternoChanged();
		
		public virtual int Registertimes
        {
            get { return _registertimes; }
			set
			{
				OnRegistertimesChanging();
				_registertimes = value;
				OnRegistertimesChanged();
			}
        }
		partial void OnRegistertimesChanging();
		partial void OnRegistertimesChanged();
		
		public virtual string Invoiceid
        {
            get { return _invoiceid; }
			set
			{
				OnInvoiceidChanging();
				_invoiceid = value;
				OnInvoiceidChanged();
			}
        }
		partial void OnInvoiceidChanging();
		partial void OnInvoiceidChanged();
		
		public virtual int Clinictype
        {
            get { return _clinictype; }
			set
			{
				OnClinictypeChanging();
				_clinictype = value;
				OnClinictypeChanged();
			}
        }
		partial void OnClinictypeChanging();
		partial void OnClinictypeChanged();
		
		public virtual int Balancesign
        {
            get { return _balancesign; }
			set
			{
				OnBalancesignChanging();
				_balancesign = value;
				OnBalancesignChanged();
			}
        }
		partial void OnBalancesignChanging();
		partial void OnBalancesignChanged();
		
		public virtual int? Refundsign
        {
            get { return _refundsign; }
			set
			{
				OnRefundsignChanging();
				_refundsign = value;
				OnRefundsignChanged();
			}
        }
		partial void OnRefundsignChanging();
		partial void OnRefundsignChanged();
		
		public virtual string Medtype
        {
            get { return _medtype; }
			set
			{
				OnMedtypeChanging();
				_medtype = value;
				OnMedtypeChanged();
			}
        }
		partial void OnMedtypeChanging();
		partial void OnMedtypeChanged();
		
		public virtual string Persontype
        {
            get { return _persontype; }
			set
			{
				OnPersontypeChanging();
				_persontype = value;
				OnPersontypeChanged();
			}
        }
		partial void OnPersontypeChanging();
		partial void OnPersontypeChanged();
		
		public virtual string Medicareno
        {
            get { return _medicareno; }
			set
			{
				OnMedicarenoChanging();
				_medicareno = value;
				OnMedicarenoChanged();
			}
        }
		partial void OnMedicarenoChanging();
		partial void OnMedicarenoChanged();
		
		public virtual string Cardno
        {
            get { return _cardno; }
			set
			{
				OnCardnoChanging();
				_cardno = value;
				OnCardnoChanged();
			}
        }
		partial void OnCardnoChanging();
		partial void OnCardnoChanged();
		
		public virtual string Medregisterno
        {
            get { return _medregisterno; }
			set
			{
				OnMedregisternoChanging();
				_medregisterno = value;
				OnMedregisternoChanged();
			}
        }
		partial void OnMedregisternoChanging();
		partial void OnMedregisternoChanged();
		
		public virtual string Medtradeno
        {
            get { return _medtradeno; }
			set
			{
				OnMedtradenoChanging();
				_medtradeno = value;
				OnMedtradenoChanged();
			}
        }
		partial void OnMedtradenoChanging();
		partial void OnMedtradenoChanged();
		
		public virtual string Medorderno
        {
            get { return _medorderno; }
			set
			{
				OnMedordernoChanging();
				_medorderno = value;
				OnMedordernoChanged();
			}
        }
		partial void OnMedordernoChanging();
		partial void OnMedordernoChanged();
		
		public virtual string Operatorid
        {
            get { return _operatorid; }
			set
			{
				OnOperatoridChanging();
				_operatorid = value;
				OnOperatoridChanged();
			}
        }
		partial void OnOperatoridChanging();
		partial void OnOperatoridChanged();
		
		public virtual System.DateTime? Operatedate
        {
            get { return _operatedate; }
			set
			{
				OnOperatedateChanging();
				_operatedate = value;
				OnOperatedateChanged();
			}
        }
		partial void OnOperatedateChanging();
		partial void OnOperatedateChanged();
		
		public virtual decimal? Accountbalance
        {
            get { return _accountbalance; }
			set
			{
				OnAccountbalanceChanging();
				_accountbalance = value;
				OnAccountbalanceChanged();
			}
        }
		partial void OnAccountbalanceChanging();
		partial void OnAccountbalanceChanged();
		
		public virtual decimal? Cashpay
        {
            get { return _cashpay; }
			set
			{
				OnCashpayChanging();
				_cashpay = value;
				OnCashpayChanged();
			}
        }
		partial void OnCashpayChanging();
		partial void OnCashpayChanged();
		
		public virtual decimal? Accountpay
        {
            get { return _accountpay; }
			set
			{
				OnAccountpayChanging();
				_accountpay = value;
				OnAccountpayChanged();
			}
        }
		partial void OnAccountpayChanging();
		partial void OnAccountpayChanged();
		
		public virtual decimal? Medicarepay
        {
            get { return _medicarepay; }
			set
			{
				OnMedicarepayChanging();
				_medicarepay = value;
				OnMedicarepayChanged();
			}
        }
		partial void OnMedicarepayChanging();
		partial void OnMedicarepayChanged();
		
		public virtual decimal? Prepay1
        {
            get { return _prepay1; }
			set
			{
				OnPrepay1Changing();
				_prepay1 = value;
				OnPrepay1Changed();
			}
        }
		partial void OnPrepay1Changing();
		partial void OnPrepay1Changed();
		
		public virtual decimal? Prepay2
        {
            get { return _prepay2; }
			set
			{
				OnPrepay2Changing();
				_prepay2 = value;
				OnPrepay2Changed();
			}
        }
		partial void OnPrepay2Changing();
		partial void OnPrepay2Changed();
		
		public virtual decimal? Prepay4
        {
            get { return _prepay4; }
			set
			{
				OnPrepay4Changing();
				_prepay4 = value;
				OnPrepay4Changed();
			}
        }
		partial void OnPrepay4Changing();
		partial void OnPrepay4Changed();
		
		public virtual decimal? Prepay5
        {
            get { return _prepay5; }
			set
			{
				OnPrepay5Changing();
				_prepay5 = value;
				OnPrepay5Changed();
			}
        }
		partial void OnPrepay5Changing();
		partial void OnPrepay5Changed();
		
		public virtual decimal? Prepay6
        {
            get { return _prepay6; }
			set
			{
				OnPrepay6Changing();
				_prepay6 = value;
				OnPrepay6Changed();
			}
        }
		partial void OnPrepay6Changing();
		partial void OnPrepay6Changed();
		
		public virtual decimal? Prepay7
        {
            get { return _prepay7; }
			set
			{
				OnPrepay7Changing();
				_prepay7 = value;
				OnPrepay7Changed();
			}
        }
		partial void OnPrepay7Changing();
		partial void OnPrepay7Changed();
		
		public virtual decimal? Prepay8
        {
            get { return _prepay8; }
			set
			{
				OnPrepay8Changing();
				_prepay8 = value;
				OnPrepay8Changed();
			}
        }
		partial void OnPrepay8Changing();
		partial void OnPrepay8Changed();
		
		public virtual decimal? Prepay9
        {
            get { return _prepay9; }
			set
			{
				OnPrepay9Changing();
				_prepay9 = value;
				OnPrepay9Changed();
			}
        }
		partial void OnPrepay9Changing();
		partial void OnPrepay9Changed();
		
		public virtual decimal? Prepay0
        {
            get { return _prepay0; }
			set
			{
				OnPrepay0Changing();
				_prepay0 = value;
				OnPrepay0Changed();
			}
        }
		partial void OnPrepay0Changing();
		partial void OnPrepay0Changed();
		
		public virtual decimal? Prepay3
        {
            get { return _prepay3; }
			set
			{
				OnPrepay3Changing();
				_prepay3 = value;
				OnPrepay3Changed();
			}
        }
		partial void OnPrepay3Changing();
		partial void OnPrepay3Changed();
		
		public virtual string Sickno
        {
            get { return _sickno; }
			set
			{
				OnSicknoChanging();
				_sickno = value;
				OnSicknoChanged();
			}
        }
		partial void OnSicknoChanging();
		partial void OnSicknoChanged();
		
		public virtual string Sickname
        {
            get { return _sickname; }
			set
			{
				OnSicknameChanging();
				_sickname = value;
				OnSicknameChanged();
			}
        }
		partial void OnSicknameChanging();
		partial void OnSicknameChanged();
		
		public virtual decimal? Prepay10
        {
            get { return _prepay10; }
			set
			{
				OnPrepay10Changing();
				_prepay10 = value;
				OnPrepay10Changed();
			}
        }
		partial void OnPrepay10Changing();
		partial void OnPrepay10Changed();
		
		public virtual decimal? Prepay11
        {
            get { return _prepay11; }
			set
			{
				OnPrepay11Changing();
				_prepay11 = value;
				OnPrepay11Changed();
			}
        }
		partial void OnPrepay11Changing();
		partial void OnPrepay11Changed();
		
		public virtual decimal? Prepay12
        {
            get { return _prepay12; }
			set
			{
				OnPrepay12Changing();
				_prepay12 = value;
				OnPrepay12Changed();
			}
        }
		partial void OnPrepay12Changing();
		partial void OnPrepay12Changed();
		
		public virtual decimal? Prepay13
        {
            get { return _prepay13; }
			set
			{
				OnPrepay13Changing();
				_prepay13 = value;
				OnPrepay13Changed();
			}
        }
		partial void OnPrepay13Changing();
		partial void OnPrepay13Changed();
		
		public virtual decimal? Prepay14
        {
            get { return _prepay14; }
			set
			{
				OnPrepay14Changing();
				_prepay14 = value;
				OnPrepay14Changed();
			}
        }
		partial void OnPrepay14Changing();
		partial void OnPrepay14Changed();
		
		public virtual decimal? Prepay15
        {
            get { return _prepay15; }
			set
			{
				OnPrepay15Changing();
				_prepay15 = value;
				OnPrepay15Changed();
			}
        }
		partial void OnPrepay15Changing();
		partial void OnPrepay15Changed();
		
		public virtual decimal? Prepay16
        {
            get { return _prepay16; }
			set
			{
				OnPrepay16Changing();
				_prepay16 = value;
				OnPrepay16Changed();
			}
        }
		partial void OnPrepay16Changing();
		partial void OnPrepay16Changed();
		
		public virtual decimal? Prepay17
        {
            get { return _prepay17; }
			set
			{
				OnPrepay17Changing();
				_prepay17 = value;
				OnPrepay17Changed();
			}
        }
		partial void OnPrepay17Changing();
		partial void OnPrepay17Changed();
		
		public virtual decimal? Prepay18
        {
            get { return _prepay18; }
			set
			{
				OnPrepay18Changing();
				_prepay18 = value;
				OnPrepay18Changed();
			}
        }
		partial void OnPrepay18Changing();
		partial void OnPrepay18Changed();
		
		public virtual decimal? Prepay19
        {
            get { return _prepay19; }
			set
			{
				OnPrepay19Changing();
				_prepay19 = value;
				OnPrepay19Changed();
			}
        }
		partial void OnPrepay19Changing();
		partial void OnPrepay19Changed();
		
		public virtual decimal? Prepay20
        {
            get { return _prepay20; }
			set
			{
				OnPrepay20Changing();
				_prepay20 = value;
				OnPrepay20Changed();
			}
        }
		partial void OnPrepay20Changing();
		partial void OnPrepay20Changed();
		
        #endregion
    }
}
